package com.byit.domain;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author wangx
 * @since 2018-12-11
 */
@Data
@TableName("sys_dept")
public class SysDept extends Model<SysDept> {

    private static final long serialVersionUID = 1L;

    /**
     * 部门id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 父部门id
     */
    @TableField("parent_id")
    private Long parentId;
    /**
     * 部门名称
     */
    @TableField("dept_name")
    private String deptName;
    /**
     * 显示顺序
     */
    @TableField("order")
    private Long order;
    /**
     * 是否删除
     */
    @TableField("id_del")
    private Integer idDel;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 操作人Id
     */
    @TableField("operation_id")
    private Long operationId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysDept{" +
                ", id=" + id +
                ", parentId=" + parentId +
                ", deptName=" + deptName +
                ", order=" + order +
                ", idDel=" + idDel +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", operationId=" + operationId +
                "}";
    }
}
